<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


<title>resume列表</title>
<%--导入css --%>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" type="text/css" />
    <script type="text/javascript">
        function delResume(id, name) {
            var b = confirm("是否需要删除《"+name+"》");
            if (b) {
                location.href = "${pageContext.request.contextPath}/resume/delete/"+id;
            }
        }
    </script>
</head>

<body class="main">
	<div id="divpagecontent">
		<table width="100%" border="0" cellspacing="0">
			<tr>
				<h1>resume list<h1>
				<td>
					<table cellspacing="0" class="listcontent">
						<tr>
						<tr><a href="${pageContext.request.contextPath}/resume/add">新增</a></tr>
			<table cellspacing="0" cellpadding="1" rules="all"
							bordercolor="gray" border="1" id="DataGrid1"
							style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 100%; WORD-BREAK: break-all; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #f5fafe; WORD-WRAP: break-word">
							<tr
								style="FONT-WEIGHT: bold; FONT-SIZE: 12pt;  BACKGROUND-COLOR: #afd1f3">
								<td align="center" width="15%">id</td>
								<td align="center" width="20%">name</td>
								<td align="center" width="15%">address</td>
								<td align="center" width="15%">phone</td>
								<td width="10%" align="center">编辑</td>
								<td width="10%" align="center">删除</td>
							</tr>

			<c:forEach items="${requestScope.resumes}" var="r">
								<tr onmouseover="this.style.backgroundColor = 'white'"
									onmouseout="this.style.backgroundColor = '#F5FAFE';">
									<td>${r.id}</td>
									<td>${r.name}</td>
									<td>${r.address}</td>
									<td>${r.phone}</td>
									<td><a href="${pageContext.request.contextPath}/resume/findOne/${r.id}">编辑</a>
									</td>
									<td ><a href="javascript:delResume('${r.id}','${r.name}')">删除</a>
									</td>
								</tr>
					</c:forEach>	
						</table>
						</td>
					</table>
				</td>
			</tr>
		</table>
	</div>
</body>
</html>
